home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2003 December / The Sunday Times - The Month 2003-12.iso / mac / The Month DEC 03 / engine / modules / bespoke.swf / scripts / frame_1 / DoAction.as
Text File  |  2003-08-19  |  1KB  |  37 lines

  1. function loadImage(mc, node, extrapath)
  2. {
  3.    extrapath != null ? 0 : (extrapath = "");
  4.    var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
  5.    var strImg = node.getText();
  6.    var diffpath = node.attributes.path;
  7.    if(diffpath != null)
  8.    {
  9.       strImg = diffpath + strImg;
  10.    }
  11.    else
  12.    {
  13.       strImg = strDefaultPath + extrapath + strImg;
  14.    }
  15.    strPathPrefix != null ? 0 : (strPathPrefix = "");
  16.    mc.loadMovie(strPathPrefix + strImg);
  17. }
  18. function init()
  19. {
  20.    var strFile = nodeData.getText();
  21.    var strW = nodeData.attributes.width;
  22.    var strH = nodeData.attributes.height;
  23.    var pt = {x:0,y:0};
  24.    this.localToGlobal(pt);
  25.    lingo("Flsh_bespokeLoad \"" + strFile + "\"," + pt.x + "," + pt.y + "," + strW + "," + strH + ",\"" + this + "\"");
  26.    onComplete();
  27. }
  28. _visible = false;
  29. stop();
  30. onReady();
  31. this.onUnload = function()
  32. {
  33.    lingo("Flsh_bespokeKill \"" + this + "\"");
  34.    delete this.onUnload;
  35.    this.unloadMovie();
  36. };
  37.